import * as actionTypes from './actionTypes';
import { fromJS } from 'immutable';
const defaultState = fromJS({
  banners: [],
  sheets: []
});

export default (state = defaultState, action) => {
  switch(action.type) {
    case actionTypes.GET_BANNERS:
      return state.set('banners', fromJS(action.banners))
    case actionTypes.GET_RECOMMEND_SHEET:
      return state.set('sheets', fromJS(action.sheets))
    default:
      return state
  }
}